//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Drawing.Diagram
{
    class Name : IOfficeXmlSerializable
    {
        private string _lang;
        private string _val;

        public void ReadXml(ReadContext context)
        {
            using (var c = context.Read("title"))
            {
                _lang = c.GetOptionalString("lang", string.Empty);
                _val = c.GetString("val");
            }

        }

        public void WriteXml(WriteContext context)
        {
            using (var c = context.Write("title"))
            {
                c.SetOptionalString("lang", _lang, string.Empty);
                c.SetString("val", _val);
            }
        }
    }
}